package com.jykj.modbus;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

@SpringBootApplication
public class ModbusDemoApplication extends SpringBootServletInitializer {

    //重写configure 从而使Tomcat识别启动类
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(ModbusDemoApplication.class);
    }

    public static void main(String[] args) {
        SpringApplication.run(ModbusDemoApplication.class, args);
    }

}
